package com.atguigu.gmall.activity.redis;


//redis监听器  接收到消息   自定义的处理实现类

import org.springframework.stereotype.Component;

@Component
public class MessageReceive {

        //接收消息
    public void receiveMessage(String message){

        System.out.println("redis:message:" + message);
        //本地内存中  JUC "30:1"
        String[] split = message.replaceAll("\"", "").split(":");//将" 更换为空 然后在根据:切割
        CacheHelper.put(split[0],split[1]);
    }

}
